home *** CD-ROM | disk | FTP | other *** search
- on wakuchk mx, my
- set x1 to the locH of sprite 1 - (320 - 42)
- set y1 to the locV of sprite 1 - (240 - 9)
- set x2 to x1 + 71
- set y2 to y1 + 53
- set temp to 0
- case the memberNum of sprite 8 of
- (the number of member "Mount1"), (the number of member "Mount2"):
- repeat with xx = 0 to 4
- repeat with yy = 0 to 4
- if ((x1 + ((71 + 51) * xx)) <= mx) and ((x2 + ((71 + 51) * xx)) >= mx) and ((y1 + ((53 + 30) * yy)) <= my) and ((y2 + ((53 + 30) * yy)) >= my) then
- set temp to xx + 1 + (yy * 5)
- set tmpx to xx
- set tmpy to yy
- exit repeat
- end if
- end repeat
- end repeat
- (the number of member "Mount3"):
- repeat with xx = 0 to 4
- repeat with yy = 0 to 3
- if ((x1 + ((71 + 51) * xx)) <= mx) and ((x2 + ((71 + 51) * xx)) >= mx) and ((y1 + ((53 + 30) * yy)) <= my) and ((y2 + ((53 + 30) * yy)) >= my) then
- set temp to xx + 1 + (yy * 5)
- set tmpx to xx
- set tmpy to yy
- exit repeat
- end if
- end repeat
- end repeat
- end case
- if temp = 0 then
- return 0
- exit
- end if
- set the locH of sprite 9 to ((71 + 51) * tmpx) + 42
- set the locV of sprite 9 to ((53 + 30) * tmpy) + 9
- updateStage()
- return temp
- end
-